home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / security / crack_4.1-tar / Scripts / do_ufc < prev    next >
Encoding:
Text File  |  1992-06-25  |  1.4 KB  |  67 lines

  1. #!/bin/sh
  2.  
  3. ###
  4. # This program is copyright Alec Muffett 1991, and is provided as part of
  5. # the Crack v4.0 Password Cracking package.  The author disclaims all
  6. # responsibility or liability with respect to it's usage or its effect
  7. # upon hardware or computer systems, and maintains copyright as set out in
  8. # the "LICENCE" document which accompanies distributions of Crack v4.0 and
  9. # upwards. So there...
  10. ###
  11.  
  12. ###
  13. # This script tries to provide an intelligent hook to the UFC-crypt library
  14. ###
  15.  
  16. if [ "x$CRACK_HOME" = "x" ]
  17. then
  18.     CRACK_HOME=".."        # for would-be developers in the Sources dir
  19. fi
  20.  
  21. UFCLIB=libufc.a
  22. SRCDIR=$CRACK_HOME/Sources
  23. UFCDIR=$CRACK_HOME/ufc-crypt
  24.  
  25. rm -f $SRCDIR/libufc.a        # just in case
  26.  
  27. echo "Looking for UFC-crypt in $UFCDIR"
  28.  
  29. if [ ! -d $UFCDIR ]
  30. then
  31.     echo "Cannot find $UFCDIR - cannot use UFC-crypt on this platform"
  32.     exit 1
  33. fi
  34.  
  35. cd $UFCDIR || exit 1
  36.  
  37. echo "Crack: Trying to compile UFC-crypt (external product by Michael Glad)"
  38. echo "Crack: Working in $UFCDIR"
  39.  
  40. if [ -f libufc.a ]
  41. then
  42.     echo "Library libufc.a exists. Testing viability..."
  43.     rm -f ufc
  44.     make ufc
  45.     if [ $? = 0 ]
  46.     then
  47.         echo "Testing ufc"
  48.         ./ufc 1
  49.         if [ $? = 0 ]
  50.         then
  51.             echo "Crack will use UFC-crypt on this platform"
  52.             exit 0
  53.         fi
  54.     fi
  55.     echo "Library is unviable on this architecture. Remaking"
  56. fi
  57.  
  58. make clean || exit 1
  59.  
  60. make ufc || exit 1
  61.  
  62. echo "Testing ufc"
  63. ./ufc 1 || exit 1
  64.  
  65. echo "Crack WILL use $UFCDIR/libufc.a on this platform."
  66. exit 0
  67.